<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>添加广告投放</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="../../bower_components/Ionicons/css/ionicons.min.css">
    <!-- daterange picker -->
    <link rel="stylesheet" href="../../bower_components/bootstrap-daterangepicker/daterangepicker.css">
    <!-- bootstrap datepicker -->
    <link rel="stylesheet" href="../../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
    <!-- iCheck for checkboxes and radio inputs -->
    <link rel="stylesheet" href="../../plugins/iCheck/all.css">
    <!-- Bootstrap Color Picker -->
    <link rel="stylesheet" href="../../bower_components/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css">
    <!-- Select2 -->
    <link rel="stylesheet" href="../../bower_components/select2/dist/css/select2.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="../../dist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../../dist/css/crmstyle.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!-- 公共头部 begin-->
    <header class="main-header">
        <!-- Logo -->
        <a href="../../index.html" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini">
          <b>龟米</b>
        </span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg">
          <img src="../../dist/img/icon_index.png" width="30" height="30" />
          <b>龟米管理系统</b>
        </span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="../../dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs">Alexander Pierce</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header" style="height: 110px;">
                                <img src="../../dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                            </li>
                            <!-- Menu Body -->

                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">Profile</a>
                                </div>
                                <div class="pull-right">
                                    <a href="#" class="btn btn-default btn-flat">Sign out</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button -->
                    <li>
                        <a href="#" data-toggle="control-sidebar">
                            <i class="fa fa-gears"></i>
                        </a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- 公共头部 end-->
    <!-- Left side column. contains the logo and sidebar -->
    <!-- 左侧列表导航 begin -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header"></li>
                <li class="active">
                    <a href="../../index.html">
                        <img class="fa-index" src="../../dist/img/icon_nav_01.png"/>
                        <span>首页</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <img class="fa-datas" src="../../dist/img/icon_nav_02.png"/>
                        <span>数据分析</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                    </a>
                    <ul class="treeview-menu">
                        <li>
                            <a href="../dataanalysis/recordOfReceipts.html">
                                <i class="fa fa-circle-o"></i> 收账记录</a>
                        </li>
                        <li>
                            <a href="../dataanalysis/customerdata.html">
                                <i class="fa fa-circle-o"></i> 客户数据</a>
                        </li>

                    </ul>
                </li>

                <li class="treeview">
                    <a href="#">
                        <!--<i class="fa fa-client"></i>-->
                        <img class="fa-client" src="../../dist/img/icon_nav_03.png"/>
                        <span>客户管理</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                    </a>
                    <ul class="treeview-menu">
                        <li>
                            <a href="../customerManagement/myclient.html">
                                <i class="fa fa-circle-o"></i> 我的客户</a>
                        </li>
                        <li>
                            <a href="../customerManagement/platformCustomer.html">
                                <i class="fa fa-circle-o"></i> 平台客户</a>
                        </li>
                        <li>
                            <a href="../customerManagement/setting.html">
                                <i class="fa fa-circle-o"></i> 设置</a>
                        </li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <!--<i class="fa fa-templates"></i>-->
                        <img class="fa-templates" src="../../dist/img/icon_nav_04.png"/>
                        <span>营销管理</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                    </a>
                    <ul class="treeview-menu">
                        <li>
                            <a href="../marketingManagement/templatemessage.html">
                                <i class="fa fa-circle-o"></i> 模板消息</a>
                        </li>
                        <li>
                            <a href="../marketingManagement/templateShort.html">
                                <i class="fa fa-circle-o"></i> 短信推送</a>
                        </li>
                        <li>
                            <a href="javascript:">
                                <i class="fa fa-circle-o"></i> 系统消息</a>
                        </li>
                        <li>
                            <a href="../marketingManagement/dvertisingIndex.html">
                                <i class="fa fa-circle-o"></i> 广告投放</a>
                        </li>

                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>
    <!-- 左侧列表导航 end -->
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper dvertisingedit_wrapper">
        <!-- Content Header (Page header) -->
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- /.col (left) -->
                <div class="col-md-12">
                    <!-- iCheck -->
                    <div class="dvertisingedit_list">
                        <div class="box-header">
                            <h3 class="box-title">广告类型</h3>
                        </div>
                        <div class="box-body">
                            <!-- Minimal style -->
                            <!-- radio -->
                            <div class="form-group dvertisingedit_formgroup">
                                <label class="col-lg-3 col-xs-6 ">
                                    <div class="border_box active">
                                        <p>店铺支付成功页</p>
                                        <input type="radio" name="r3" class="flat-red" checked>
                                    </div>
                                </label>
                                <label class="col-lg-3 col-xs-6">
                                    <div class="border_box">
                                    <p>平台支付成功页</p>
                                    <input type="radio" name="r3" class="flat-red">
                                    </div>
                                </label>
                                <label class="col-lg-3 col-xs-6">
                                    <div class="border_box">
                                    <p>龟米商城钻展<br/>（暂未开放）</p>
                                    <input type="radio" name="r3" class="flat-red">
                                    </div>
                                </label>
                                <label class="col-lg-3 col-xs-6">
                                    <div class="border_box">
                                    <p>龟米商城推文<br/>（暂未开放）</p>
                                    <input type="radio" name="r3" class="flat-red">
                                    </div>
                                </label>
                            </div>
                            <dl class="formgroup_dl">
                                <dt>说明</dt>
                                <dd>客户到店消费，支付成功后页面，展示该店铺的广告。包月30元，不限展示次数。</dd>
                            </dl>
                        </div>
                    </div>
                    <!-- /.box -->
                    <div class="dvertisingedit_list">
                        <div class="box-header">
                            <h3 class="box-title">计划信息</h3>
                        </div>
                        <div class="box-body">
                            <!-- input begin -->
                            <form class="form-horizontal list_center_formgroup">
                                <div class="box-body">
                                    <div class="form-group">
                                        <label for="inputEmail3" class="col-sm-2 control-label">计划名称</label>
                                        <div class="col-sm-6">
                                            <input type="text" class="form-control" id="inputEmail3" placeholder="计划名称">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="inputPassword3" class="col-sm-2 control-label">广告链接</label>
                                        <div class="col-sm-6">
                                            <input type="text" class="form-control" id="inputPassword3" placeholder="www.yecai.com">
                                            <p class="txt">禁止发布任何色情淫秽 激进时政或意识形态内容，发现后直接下架，广告费用不退还</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="inputEmail3" class="col-sm-2 control-label">广告图</label>
                                        <div class="col-sm-6">
                                            <!--<input type="text" class="form-control"  placeholder="计划名称">-->
                                            <label>
                                                <div class="chooseImage_div">
                                                    <img id="cropedBigImg" src="../../dist/img/setting/fileimg.jpg" value='custom' alt="lorem ipsum dolor sit" data-address='' title="自定义背景"/>
                                                </div>
                                                <input type="file" id="chooseImage" name="file" style="display: none;">
                                            </label>
                                            <!-- 保存用户自定义的背景图片 -->

                                            <p class="txt">建议尺寸：300*800像素，重新上传，图片会被覆盖</p>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.box-body -->
                            </form>
                            <!-- input end -->
                        </div>
                    </div>
                    <!-- /list -->
                    <div class="dvertisingedit_list">
                        <div class="box-header">
                            <h3 class="box-title">计划信息</h3>
                        </div>
                        <div class="box-body">
                            <!-- input begin -->
                            <form class="form-horizontal list_center_select">
                                <div class="form-group col-md-3 col-xs-12">
                                    <label>购买力:</label>
                                    <select class="form-control">
                                        <option>高消费</option>
                                        <option>option 2</option>
                                        <option>option 3</option>
                                        <option>option 4</option>
                                        <option>option 5</option>
                                    </select>
                                </div>
                                <div class="form-group col-md-3 col-xs-12">
                                    <label>消费偏向:</label>
                                    <select class="form-control">
                                        <option>家具</option>
                                        <option>option 2</option>
                                        <option>option 3</option>
                                        <option>option 4</option>
                                        <option>option 5</option>
                                    </select>
                                </div>
                                <div class="form-group col-md-3 col-xs-12">
                                    <label>群发地区:</label>
                                    <select class="form-control">
                                        <option>新华</option>
                                        <option>option 2</option>
                                        <option>option 3</option>
                                        <option>option 4</option>
                                        <option>option 5</option>
                                    </select>
                                </div>
                                <div class="form-group col-md-3 col-xs-12">
                                    <label>性别:</label>
                                    <select class="form-control">
                                        <option>男</option>
                                        <option>女</option>
                                        <option>不确定</option>
                                    </select>
                                </div>
                                <!-- /.box-body -->
                            </form>
                            <!-- input end -->
                        </div>
                    </div>
                    <!-- / list-->
                    <div class="dvertisingedit_list">
                        <div class="box-header">
                            <h3 class="box-title">费用计划</h3>
                        </div>
                        <div class="box-body">
                            <!-- input begin -->
                            <form class="form-horizontal list_center_formgroup">
                                <div class="box-body">
                                    <div class="form-group">
                                        <label for="inputEmail3" class="col-sm-2 control-label">投放金额（元）</label>
                                        <div class="col-sm-2">
                                            <input type="text" class="form-control"  placeholder="100">
                                            <p class="txt" style="color: #34cfbd;">（共20000次展示）</p>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.box-body -->
                                <div class="btn_adddvertising">添加计划</div>
                            </form>
                            <!-- input end -->
                        </div>
                    </div>
                </div>
                <!-- /.col (right) -->
            </div>
            <!-- /.row -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <!--二维码弹窗 begin-->
    <div class="park_box">
        <dl>
            <dt class="fontsize16 colore0192b">扫码支付并群发短信</dt>
            <dd>
                <img style="width: 190px;height: 190px;"
                     src="https://logistics.xiaoguikuaipao.com/onePay/shardBounty/qrcode/90/e8e0ac57a3604ddaadeb4e2bb66eb83d"/>
            </dd>
            <dd class="btn_close"><span><i class="fa fa-fw fa-remove"></i></span></dd>
        </dl>
    </div>
    <!--二维码弹窗 end-->
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Select2 -->
<script src="../../bower_components/select2/dist/js/select2.full.min.js"></script>
<!-- InputMask -->
<script src="../../plugins/input-mask/jquery.inputmask.js"></script>
<script src="../../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="../../plugins/input-mask/jquery.inputmask.extensions.js"></script>
<!-- date-range-picker -->
<script src="../../bower_components/moment/min/moment.min.js"></script>
<script src="../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../../bower_components/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js"></script>
<!-- bootstrap time picker -->
<script src="../../plugins/timepicker/bootstrap-timepicker.min.js"></script>
<!-- SlimScroll -->
<script src="../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- iCheck 1.0.1 -->
<script src="../../plugins/iCheck/icheck.min.js"></script>
<!-- FastClick -->
<script src="../../bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- Page script -->
<script>
    $(function () {
        $('#header').load('../common/header.html');
        //Flat red color scheme for iCheck
        $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
            radioClass   : 'icheckbox_flat-green'
        })
//        选择广告类型
        $('.dvertisingedit_formgroup label').on('click',function(){
            $(this).children('.border_box').addClass('active').end().siblings().children('.border_box').removeClass('active');
        });
//        上传图片本地预览
        $('#chooseImage').on('change',function(){
            var filePath = $(this).val(),         //获取到input的value，里面是文件的路径
                fileFormat = filePath.substring(filePath.lastIndexOf(".")).toLowerCase(),
                src = window.URL.createObjectURL(this.files[0]); //转成可以在本地预览的格式

            // 检查是否是图片
            if( !fileFormat.match(/.png|.jpg|.jpeg/) ) {
                error_prompt_alert('上传错误,文件格式必须为：png/jpg/jpeg');
                return;
            }

            $('#cropedBigImg').attr('src',src);
        });
//        显示扫码支付弹窗
        $('.dvertisingedit_list .btn_adddvertising').on('click',function(){
            $('.park_box').show();
        })
//        隐藏扫码支付弹窗
        $('.park_box .btn_close').on('click',function(){
            $('.park_box').hide();
        })
    })

</script>
</body>
</html>
